package route

import (
	"github.com/APP/internal/handler"
	"github.com/gin-gonic/gin"
)

func RegisterRouteRoutes(group *gin.RouterGroup) {
	routeHandler := handler.NewRouteHandler()

	// 路由管理
	routeGroup := group.Group("/route")
	{
		routeGroup.POST("", routeHandler.CreateRoute)       // 创建路由
		routeGroup.PUT("/:id", routeHandler.UpdateRoute)    // 更新路由
		routeGroup.DELETE("/:id", routeHandler.DeleteRoute) // 删除路由
		routeGroup.GET("/:id", routeHandler.GetRoute)       // 获取路由详情
		routeGroup.GET("", routeHandler.GetRouteList)       // 获取路由列表
		routeGroup.GET("/tree", routeHandler.GetRouteTree)  // 获取路由树形结构
	}
}
